//
//  PortInViewController.m
//  CocoaSynth
//
//  Created by Thomas Dupont on 19/02/10.
//  Copyright 2010 Apple Inc. All rights reserved.
//

#import "PortInViewController.h"

#import "PortInProtocol.h"
#import "PortView.h"
#import "PortInView.h"

@implementation PortInViewController

@synthesize model;

- (id)initWithPortIn:(id<PortInProtocol>)aPortIn atPoint:(NSPoint)thePoint
{
	if (self = [super init]) {
		model = aPortIn;
		PortView* portView = [[PortInView alloc] initWithFrame:NSMakeRect(thePoint.x, thePoint.y, 20, 20)];
		[portView setController:self];
		self.view = portView;
	}
	return self;
}

- (void)portSelected
{
	[module selectPortIn:self];
}

@end
